import request from '@/utils/request'

const prePath = "/supplier";

//获取发货单列表
export function getDeliverOrder(params) {
    return request({
        url: prePath + '/deliverOrder/likeFind',
        method: 'get',
        params
    })
}

//模糊查询销售单
export function likeFind(params) {
    return request({
        url: prePath + '/saleOrder/likeFind',
        method: 'get',
        params
    })
}
//查看详情
export function findDetail(params) {
    return request({
        url: prePath + '/saleOrder/findSaleOrderDetail',
        method: 'get',
        params
    })
}
export function findDeliverDetail(params) {
    return request({
        url: prePath + '/deliverOrder/findDeliverOrderDetail',
        method: 'get',
        params
    })
}
//新增数据
export function addDeliverOrder(data) {
    return request({
        url: prePath + '/deliverOrder/insert',
        method: 'post',
        data
    })
}
//修改手工录入销售单
export function updateSaleOrder(data) {
    return request({
        url: prePath + '/saleOrder/updateHandwork',
        method: 'put',
        data
    })
}
//生成发货单
export function showCreatDeliverView(params) {
    return request({
        url: prePath + '/saleOrder/likeFind',
        method: 'get',
        params
    })
}
// 打印发货单
export function sprintDeliver(params) {
    return request({
        url: prePath + `/deliverOrder/${params}/print`,
        method: 'get',
    })
}